\(\int \frac {(d+e x^2) (a+b \arctan (c x))}{x^5} \, dx\) [1122]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 82 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=-\frac {b c d}{12 x^3}+\frac {b c \left (c^2 d-2 e\right )}{4 x}+\frac {1}{4} b c^2 \left (c^2 d-2 e\right ) \arctan (c x)-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2} \]

[Out]

-1/12*b*c*d/x^3+1/4*b*c*(c^2*d-2*e)/x+1/4*b*c^2*(c^2*d-2*e)*arctan(c*x)-1/4*d*(a+b*arctan(c*x))/x^4-1/2*e*(a+b
*arctan(c*x))/x^2

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {14, 5096, 12, 464, 331, 209} \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2}+\frac {1}{4} b c^2 \arctan (c x) \left (c^2 d-2 e\right )+\frac {b c \left (c^2 d-2 e\right )}{4 x}-\frac {b c d}{12 x^3} \]

[In]

Int[((d + e*x^2)*(a + b*ArcTan[c*x]))/x^5,x]

[Out]

-1/12*(b*c*d)/x^3 + (b*c*(c^2*d - 2*e))/(4*x) + (b*c^2*(c^2*d - 2*e)*ArcTan[c*x])/4 - (d*(a + b*ArcTan[c*x]))/
(4*x^4) - (e*(a + b*ArcTan[c*x]))/(2*x^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 5096

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^
2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] &&  !(ILtQ[(m - 1)/2, 0] && GtQ[m +
2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&
  !ILtQ[(m - 1)/2, 0]))

Rubi steps \begin{align*} \text {integral}& = -\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2}-(b c) \int \frac {-d-2 e x^2}{4 x^4 \left (1+c^2 x^2\right )} \, dx \\ & = -\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2}-\frac {1}{4} (b c) \int \frac {-d-2 e x^2}{x^4 \left (1+c^2 x^2\right )} \, dx \\ & = -\frac {b c d}{12 x^3}-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2}-\frac {1}{4} \left (b c \left (c^2 d-2 e\right )\right ) \int \frac {1}{x^2 \left (1+c^2 x^2\right )} \, dx \\ & = -\frac {b c d}{12 x^3}+\frac {b c \left (c^2 d-2 e\right )}{4 x}-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2}+\frac {1}{4} \left (b c^3 \left (c^2 d-2 e\right )\right ) \int \frac {1}{1+c^2 x^2} \, dx \\ & = -\frac {b c d}{12 x^3}+\frac {b c \left (c^2 d-2 e\right )}{4 x}+\frac {1}{4} b c^2 \left (c^2 d-2 e\right ) \arctan (c x)-\frac {d (a+b \arctan (c x))}{4 x^4}-\frac {e (a+b \arctan (c x))}{2 x^2} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.01 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.18 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=-\frac {a d}{4 x^4}-\frac {a e}{2 x^2}-\frac {b d \arctan (c x)}{4 x^4}-\frac {b e \arctan (c x)}{2 x^2}-\frac {b c d \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-c^2 x^2\right )}{12 x^3}-\frac {b c e \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-c^2 x^2\right )}{2 x} \]

[In]

Integrate[((d + e*x^2)*(a + b*ArcTan[c*x]))/x^5,x]

[Out]

-1/4*(a*d)/x^4 - (a*e)/(2*x^2) - (b*d*ArcTan[c*x])/(4*x^4) - (b*e*ArcTan[c*x])/(2*x^2) - (b*c*d*Hypergeometric
2F1[-3/2, 1, -1/2, -(c^2*x^2)])/(12*x^3) - (b*c*e*Hypergeometric2F1[-1/2, 1, 1/2, -(c^2*x^2)])/(2*x)

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.17

method result size
parts \(a \left (-\frac {d}{4 x^{4}}-\frac {e}{2 x^{2}}\right )+b \,c^{4} \left (-\frac {\arctan \left (c x \right ) d}{4 c^{4} x^{4}}-\frac {\arctan \left (c x \right ) e}{2 c^{4} x^{2}}-\frac {-\frac {c^{2} d -2 e}{c x}+\frac {d}{3 c \,x^{3}}+\left (-c^{2} d +2 e \right ) \arctan \left (c x \right )}{4 c^{2}}\right )\) \(96\)
parallelrisch \(\frac {3 x^{4} \arctan \left (c x \right ) b \,c^{4} d -6 \arctan \left (c x \right ) b \,c^{2} e \,x^{4}+6 a \,c^{2} e \,x^{4}+3 b \,c^{3} d \,x^{3}-6 b c e \,x^{3}-6 \arctan \left (c x \right ) b e \,x^{2}-6 a e \,x^{2}-b c d x -3 \arctan \left (c x \right ) b d -3 a d}{12 x^{4}}\) \(99\)
derivativedivides \(c^{4} \left (\frac {a \left (-\frac {d}{4 c^{2} x^{4}}-\frac {e}{2 c^{2} x^{2}}\right )}{c^{2}}+\frac {b \left (-\frac {\arctan \left (c x \right ) d}{4 c^{2} x^{4}}-\frac {\arctan \left (c x \right ) e}{2 c^{2} x^{2}}-\frac {\left (-c^{2} d +2 e \right ) \arctan \left (c x \right )}{4}+\frac {c^{2} d -2 e}{4 c x}-\frac {d}{12 c \,x^{3}}\right )}{c^{2}}\right )\) \(104\)
default \(c^{4} \left (\frac {a \left (-\frac {d}{4 c^{2} x^{4}}-\frac {e}{2 c^{2} x^{2}}\right )}{c^{2}}+\frac {b \left (-\frac {\arctan \left (c x \right ) d}{4 c^{2} x^{4}}-\frac {\arctan \left (c x \right ) e}{2 c^{2} x^{2}}-\frac {\left (-c^{2} d +2 e \right ) \arctan \left (c x \right )}{4}+\frac {c^{2} d -2 e}{4 c x}-\frac {d}{12 c \,x^{3}}\right )}{c^{2}}\right )\) \(104\)
risch \(\frac {i b \left (2 e \,x^{2}+d \right ) \ln \left (i c x +1\right )}{8 x^{4}}-\frac {3 i \ln \left (-c x +i\right ) b \,c^{4} d \,x^{4}-3 i \ln \left (-c x -i\right ) b \,c^{4} d \,x^{4}-6 i \ln \left (-c x +i\right ) b \,c^{2} e \,x^{4}+6 i \ln \left (-c x -i\right ) b \,c^{2} e \,x^{4}-6 b \,c^{3} d \,x^{3}+6 i b e \ln \left (-i c x +1\right ) x^{2}+12 b c e \,x^{3}+3 i b d \ln \left (-i c x +1\right )+12 a e \,x^{2}+2 b c d x +6 a d}{24 x^{4}}\) \(171\)

[In]

int((e*x^2+d)*(a+b*arctan(c*x))/x^5,x,method=_RETURNVERBOSE)

[Out]

a*(-1/4*d/x^4-1/2*e/x^2)+b*c^4*(-1/4*arctan(c*x)*d/c^4/x^4-1/2*arctan(c*x)/c^4*e/x^2-1/4/c^2*(-(c^2*d-2*e)/c/x
+1/3*d/c/x^3+(-c^2*d+2*e)*arctan(c*x)))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.91 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=-\frac {b c d x + 6 \, a e x^{2} - 3 \, {\left (b c^{3} d - 2 \, b c e\right )} x^{3} + 3 \, a d - 3 \, {\left ({\left (b c^{4} d - 2 \, b c^{2} e\right )} x^{4} - 2 \, b e x^{2} - b d\right )} \arctan \left (c x\right )}{12 \, x^{4}} \]

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x^5,x, algorithm="fricas")

[Out]

-1/12*(b*c*d*x + 6*a*e*x^2 - 3*(b*c^3*d - 2*b*c*e)*x^3 + 3*a*d - 3*((b*c^4*d - 2*b*c^2*e)*x^4 - 2*b*e*x^2 - b*
d)*arctan(c*x))/x^4

Sympy [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.21 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=- \frac {a d}{4 x^{4}} - \frac {a e}{2 x^{2}} + \frac {b c^{4} d \operatorname {atan}{\left (c x \right )}}{4} + \frac {b c^{3} d}{4 x} - \frac {b c^{2} e \operatorname {atan}{\left (c x \right )}}{2} - \frac {b c d}{12 x^{3}} - \frac {b c e}{2 x} - \frac {b d \operatorname {atan}{\left (c x \right )}}{4 x^{4}} - \frac {b e \operatorname {atan}{\left (c x \right )}}{2 x^{2}} \]

[In]

integrate((e*x**2+d)*(a+b*atan(c*x))/x**5,x)

[Out]

-a*d/(4*x**4) - a*e/(2*x**2) + b*c**4*d*atan(c*x)/4 + b*c**3*d/(4*x) - b*c**2*e*atan(c*x)/2 - b*c*d/(12*x**3)
- b*c*e/(2*x) - b*d*atan(c*x)/(4*x**4) - b*e*atan(c*x)/(2*x**2)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.98 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=\frac {1}{12} \, {\left ({\left (3 \, c^{3} \arctan \left (c x\right ) + \frac {3 \, c^{2} x^{2} - 1}{x^{3}}\right )} c - \frac {3 \, \arctan \left (c x\right )}{x^{4}}\right )} b d - \frac {1}{2} \, {\left ({\left (c \arctan \left (c x\right ) + \frac {1}{x}\right )} c + \frac {\arctan \left (c x\right )}{x^{2}}\right )} b e - \frac {a e}{2 \, x^{2}} - \frac {a d}{4 \, x^{4}} \]

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x^5,x, algorithm="maxima")

[Out]

1/12*((3*c^3*arctan(c*x) + (3*c^2*x^2 - 1)/x^3)*c - 3*arctan(c*x)/x^4)*b*d - 1/2*((c*arctan(c*x) + 1/x)*c + ar
ctan(c*x)/x^2)*b*e - 1/2*a*e/x^2 - 1/4*a*d/x^4

Giac [F]

\[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=\int { \frac {{\left (e x^{2} + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{5}} \,d x } \]

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x^5,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.73 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.98 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^5} \, dx=-\frac {\frac {a\,d}{4}+\frac {a\,x^2\,\left (d\,c^2+2\,e\right )}{4}+\frac {b\,d\,\mathrm {atan}\left (c\,x\right )}{4}+\frac {b\,c\,d\,x}{12}+\frac {b\,c^3\,x^5\,\left (2\,e-c^2\,d\right )}{4}+\frac {b\,c\,x^3\,\left (3\,e-c^2\,d\right )}{6}-\frac {a\,c^4\,e\,x^6}{2}+\frac {b\,x^2\,\mathrm {atan}\left (c\,x\right )\,\left (d\,c^2+2\,e\right )}{4}+\frac {b\,c^2\,e\,x^4\,\mathrm {atan}\left (c\,x\right )}{2}}{c^2\,x^6+x^4}-\frac {\mathrm {atan}\left (\frac {c^2\,x}{\sqrt {c^2}}\right )\,\left (2\,b\,e-b\,c^2\,d\right )\,{\left (c^2\right )}^{3/2}}{4\,c} \]

[In]

int(((a + b*atan(c*x))*(d + e*x^2))/x^5,x)

[Out]

- ((a*d)/4 + (a*x^2*(2*e + c^2*d))/4 + (b*d*atan(c*x))/4 + (b*c*d*x)/12 + (b*c^3*x^5*(2*e - c^2*d))/4 + (b*c*x
^3*(3*e - c^2*d))/6 - (a*c^4*e*x^6)/2 + (b*x^2*atan(c*x)*(2*e + c^2*d))/4 + (b*c^2*e*x^4*atan(c*x))/2)/(x^4 +
c^2*x^6) - (atan((c^2*x)/(c^2)^(1/2))*(2*b*e - b*c^2*d)*(c^2)^(3/2))/(4*c)